package com.henry.veterinary;

import java.util.Objects;

public class Owner {
    // 会员编号，姓名，联系方式，住址
    private String ID;
    private String name;
    private String contact;
    private String address;

    public Owner(String ID, String name, String contact, String address) {
        this.ID = ID;
        this.name = name;
        this.contact = contact;
        this.address = address;
    }

    @Override
    public String toString() {
        return "Owner{" +
                "ID='" + ID + '\'' +
                ", name='" + name + '\'' +
                ", tel='" + contact + '\'' +
                ", address='" + address + '\'' +
                '}';
    }

    public String getID() {
        return ID;
    }

    public String getName() {
        return name;
    }

    public String getContact() {
        return contact;
    }

    public String getAddress() {
        return address;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Owner owner = (Owner) o;
        return Objects.equals(ID, owner.ID);
    }

    @Override
    public int hashCode() {
        return Objects.hash(ID);
    }
}
